package com.york.tinyrpc.protoss.loadbalancer;

import com.york.tinyrpc.protoss.model.ServiceMetaInfo;

import java.util.List;
import java.util.Map;

/**
 * 定义负载均衡器能力
 */
public interface LoadBalancer {


    /**
     * 负载均衡器决定获取目标服务信息
     *
     * @param requestParams 请求参数
     * @param serviceList   可选服务列表
     * @return
     */
    ServiceMetaInfo getTargetService(Map<String, Object> requestParams,
                                     List<ServiceMetaInfo> serviceList);
}
